<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'Category.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link type="text/css" rel="stylesheet"
	href="/EasyBuy/statics/css/style.css" />

<script type="text/javascript"
	src="/EasyBuy/statics/js/jquery-1.11.1.min_044d0927.js"></script>
<script type="text/javascript"
	src="/EasyBuy/statics/js/jquery.bxslider_e88acd1b.js"></script>

<script type="text/javascript"
	src="/EasyBuy/statics/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/EasyBuy/statics/js/menu.js"></script>

<script type="text/javascript" src="/EasyBuy/statics/js/lrscroll_1.js"></script>


<script type="text/javascript" src="/EasyBuy/statics/js/n_nav.js"></script>
<script type="text/javascript" src="/EasyBuy/statics/js/milk_ban.js"></script>
<script type="text/javascript" src="/EasyBuy/statics/js/paper_ban.js"></script>
<script type="text/javascript" src="/EasyBuy/statics/js/baby_ban.js"></script>

</head>
<script type="text/javascript"
		src="/EasyBuy/statics/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		function hideType(){
			$(".leftNav").hide();
		}
		hideType();
		
		$(".twoLevelName,.twoNames").click(function(){
			var ids=$(this).attr("name");
			$.getJSON("ConmmodityListServlet","opr=categoryListTwoNo&id="+ids,callTwoLevelName);
			function callTwoLevelName(data){
				$(".milk_right>ul").html("");
				for(var i=0;data.length;i++){
					$(".milk_right>ul").append("<li>"+
						"<div class='img'>"+
							"<a href='ConmmodityDetailsServlet?opr=productDetils&id="+data[i].id+"'><img src='/EasyBuy/statics/images/"+data[i].fileName+"'"+
								"width='185' height='155' /> </a>"+
						"</div>"+
						"<div class='name'>"+
							"<a href='#'>"+data[i].name+"</a>"+
						"</div>"+
						"<div class='price'>"+
						"	<font>￥<span>"+data[i].price+"</span> </font> &nbsp;"+data[i].integral+"R"+
						"</div>"+
					"</li>");
				}
			}
		});
		$(".threeNames").click(function(){
						var id=$(this).attr("name");
						$.getJSON("ConmmodityListServlet","opr=categoryListThreeNo&id="+id,callThreeName);
						function callThreeName(dataThree){
							$(".milk_right>ul").html("");
							for(var i=0;dataThree.length;i++){
								$(".milk_right>ul").append("<li>"+
								"<div class='img'>"+
								"<a href='ConmmodityDetailsServlet?opr=productDetils&id="+dataThree[i].id+"'><img src='/EasyBuy/statics/images/"+dataThree[i].fileName+"'"+
								"width='185' height='155' /> </a>"+
								"</div>"+
								"<div class='name'>"+
								"<a href='#'>"+dataThree[i].name+"</a>"+
								"</div>"+
								"<div class='price'>"+
								"<font>￥<span>"+dataThree[i].price+"</span> </font> &nbsp;"+dataThree[i].integral+"R"+
								"</div>"+
								"</li>");
							}
						}
					});
	});
</script>
<body>
<input type="hidden" id="yin" value="<%=request.getParameter("id")%>"/>
<c:if test="${list1==null }">
	<%
		request.getRequestDispatcher("/IndexServlet?opr=type&hre=Category").forward(request, response);
	 %>
</c:if>
	<!-- 头部 -->

	<%@ include file="../../common/header.jsp"%>
	<%@ include file="../../common/preHeader.jsp"%>
	<!--Begin Header Begin-->


	<!--End Menu End-->
	<div class="i_bg">
		<div class="content">
			<div class="cate_nav">
				<c:forEach items="${getOneIdCategoryLists }" var="twoNames">
					<dl>
            			<dt><a href="#" class="twoNames" name="${twoNames.id }">${twoNames.name }</a></dt>
            			<c:forEach items="${twoNames.productCategoryThree }" var ="threeNames">
            				<dd><a href="#" class="threeNames" name="${threeNames.id }">${threeNames.name }</a></dd>
            			</c:forEach>
            </dl>
				</c:forEach>
			</div>
			<!--Begin Banner Begin-->
			<div class="nban">
				<div class="top_slide_wrap">
					<ul class="slide_box bxslider">
						<li><img src="/EasyBuy/statics/images/nban.jpg" width="977"
							height="401" /></li>
						<li><img src="/EasyBuy/statics/images/nban.jpg" width="977"
							height="401" /></li>
						<li><img src="/EasyBuy/statics/images/nban.jpg" width="977"
							height="401" /></li>
					</ul>
					<div class="op_btns clearfix">
						<a href="#" class="op_btn op_prev"><span></span> </a> <a href="#"
							class="op_btn op_next"><span></span> </a>
					</div>
				</div>
			</div>
			<script type="text/javascript">
				//var jq = jQuery.noConflict();
				(function() {
					$(".bxslider").bxSlider({
						auto : true,
						prevSelector : jq(".top_slide_wrap .op_prev")[0],
						nextSelector : jq(".top_slide_wrap .op_next")[0]
					});
				})();
			</script>
			<!--End Banner End-->
		</div>
		<div class="content mar_15">
			<ul class="cate">
				<li><a href="/EasyBuy/pre/product/CategoryList.jsp"><img
						src="/EasyBuy/statics/images/ca_1.jpg" width="295" height="220" />
				</a></li>
				<li><a href="/EasyBuy/pre/product/CategoryList.jsp"><img
						src="/EasyBuy/statics/images/ca_2.jpg" width="295" height="220" />
				</a></li>
				<li><a href="/EasyBuy/pre/product/CategoryList.jsp"><img
						src="/EasyBuy/statics/images/ca_3.jpg" width="295" height="220" />
				</a></li>
				<li><a href="/EasyBuy/pre/product/CategoryList.jsp"><img
						src="/EasyBuy/statics/images/ca_4.jpg" width="295" height="220" />
				</a></li>
			</ul>
		</div>
		<!--Begin 热卖爆款商品 Begin-->
		<div class="i_t mar_10">
			<span class="fl">热卖爆款商品</span> <span class="fr">TOP .10</span>
		</div>
		<div class="like">
			<div id="featureContainer1">
				<div id="feature1">
					<div id="block1">
						<div id="botton-scroll1">
							<ul class="featureUL">
								<li class="featureBox">
									<div class="box">
										<div class="imgbg">
											<a href="ConmmodityListServlet?opr=categoryList&id=548"><img src="/EasyBuy/statics/images/bk_1.jpg"
												width="160" height="136" /> </a>
										</div>
										<div class="name">
											<a href="ConmmodityListServlet?opr=categoryList&id=548">
												<h2>德国进口</h2> 德亚全脂纯牛奶200ml*48盒 </a>
										</div>
										<div class="price">
											<font>￥<span>189</span> </font> &nbsp; 26R
										</div>
									</div>
								</li>
								<li class="featureBox">
									<div class="box">
										<div class="imgbg">
											<a href="ConmmodityListServlet?opr=categoryList&id=628"><img src="/EasyBuy/statics/images/bk_2.jpg"
												width="160" height="136" /> </a>
										</div>
										<div class="name">
											<a href="ConmmodityListServlet?opr=categoryList&id=628">
												<h2>iphone 6S</h2> Apple/苹果 iPhone 6s Plus公开版 </a>
										</div>
										<div class="price">
											<font>￥<span>5288</span> </font> &nbsp; 25R
										</div>
									</div>
								</li>
								<li class="featureBox">
									<div class="box">
										<div class="imgbg">
											<a href="ConmmodityListServlet?opr=categoryList&id=654"><img src="/EasyBuy/statics/images/bk_3.jpg"
												width="160" height="136" /> </a>
										</div>
										<div class="name">
											<a href="ConmmodityListServlet?opr=categoryList&id=654">
												<h2>倩碧特惠组合套装</h2> 倩碧补水组合套装8折促销 </a>
										</div>
										<div class="price">
											<font>￥<span>368</span> </font> &nbsp; 18R
										</div>
									</div>
								</li>
								<li class="featureBox">
									<div class="box">
										<div class="imgbg">
											<a href="ConmmodityListServlet?opr=categoryList&id=670"><img src="/EasyBuy/statics/images/bk_4.jpg"
												width="160" height="136" /> </a>
										</div>
										<div class="name">
											<a href="ConmmodityListServlet?opr=categoryList&id=670">
												<h2>品利特级橄榄油</h2> 750ml*4瓶装组合 西班牙原装进口 </a>
										</div>
										<div class="price">
											<font>￥<span>280</span> </font> &nbsp; 30R
										</div>
									</div>
								</li>
								<li class="featureBox">
									<div class="box">
										<div class="imgbg">
											<a href="ConmmodityListServlet?opr=categoryList&id=681"><img src="/EasyBuy/statics/images/bk_5.jpg"
												width="160" height="136" /> </a>
										</div>
										<div class="name">
											<a href="ConmmodityListServlet?opr=categoryList&id=681">
												<h2>品利特级橄榄油</h2> 750ml*4瓶装组合 西班牙原装进口 </a>
										</div>
										<div class="price">
											<font>￥<span>280</span> </font> &nbsp; 30R
										</div>
									</div>
								</li>
							</ul>
						</div>
					</div>
					<a class="l_prev" href="javascript:void();">Previous</a> <a
						class="l_next" href="javascript:void();">Next</a>
				</div>
			</div>
		</div>
		<!--End 热卖爆款商品 End-->
		<div class="i_t mar_10">
			<span class="fl t_color">${oneLevelName }</span> <span class="i_mores fr">
				<c:forEach items="${ twoLevelNames}" var="twoName">
					<a class="twoLevelName" name="${twoName.id }">${twoName.name }</a>&nbsp; &nbsp; |
				</c:forEach>
			</span>
		</div>
		<div class="content">
			<div class="milk_ban">
				<div id="imgPlaym">
					<ul class="imgs" id="actorm">
						<li><a href="/EasyBuy/pre/product/CategoryList.jsp"><img
								src="/EasyBuy/statics/images/milk_ban.jpg" width="228"
								height="418" /> </a></li>
						<li><a href="/EasyBuy/pre/product/CategoryList.jsp"><img
								src="/EasyBuy/statics/images/milk_ban.jpg" width="228"
								height="418" /> </a></li>
						<li><a href="/EasyBuy/pre/product/CategoryList.jsp"><img
								src="/EasyBuy/statics/images/milk_ban.jpg" width="228"
								height="418" /> </a></li>
					</ul>
					<div class="prevm">上一张</div>
					<div class="nextm">下一张</div>
				</div>
			</div>
			<div class="milk_right">
				<ul>
				<c:forEach items="${ oneLevelIdProducts}" var="oneProducts">
					<li>
						<div class="img">
							<a href="ConmmodityDetailsServlet?opr=productDetils&id=${oneProducts.id }"><img src="/EasyBuy/statics/images/${oneProducts.fileName }"
								width="185" height="155" /> </a>
						</div>
						<div class="name">
							<a href="#">${oneProducts.name }</a>
						</div>
						<div class="price">
							<font>￥<span>${oneProducts.price }</span> </font> &nbsp; ${oneProducts.integral }R
						</div>
					</li>
				</c:forEach>
				</ul>
			</div>
		</div>
		<!--Begin Footer Begin -->
		<!--End 猜你喜欢 End-->

		<%@ include file="../../common/footer.jsp"%>

		<!-- 脚部 -->
	</div>
</body>

</html>
